import Ember from 'ember';

export default Ember.Controller.extend({
  constants: Constants,
  mainController: Ember.inject.controller('business.mainpage'),
  actions:{
    toSchedulingDetailPage(staffschedule){
      if(staffschedule){
        let id=staffschedule.get('id');
        this.get("mainController").switchMainPage('nursing-staff-scheduling-detail',{id:id,editMode:"edit"});
      }else{
        this.get("mainController").switchMainPage('nursing-staff-scheduling-detail',{editMode:"add"});
      }
    },
  }
});
